import { aggregationService } from '@/api/aggregation'

// 业务员积分值相关API

/**
 * 获取业务员积分统计
 * @param {number} userId 业务员ID
 * @returns {Promise}
 */
export function getSalesmanPointsStats(userId) {
  return aggregationService({
    url: '/agg/account/getInfo',
    method: 'get',
    params: { userId }
  })
}

/**
 * 获取业务员积分明细
 * @param {Object} params 查询参数
 * @returns {Promise}
 */
export function getSalesmanPointsDetail(params) {
  return aggregationService({
    url: '/agg/points/getInfo',
    method: 'post',
    data: params
  })
}
